# coding: utf-8
from . import db, BaseModel


class ApiKey(BaseModel):
    __tablename__ = 'api_key'

    auto_id = db.Column(db.Integer, primary_key=True, info='自增主键')
    key_id = db.Column(db.String(20, 'utf8mb4_0900_ai_ci'), info='API KEY ID')
    user_id = db.Column(db.String(20, 'utf8mb4_0900_ai_ci'), info='用户ID')
    content = db.Column(db.String(255), info='API KEY')
    chat_model = db.Column(db.String(255), info='对话模型')
    settings = db.Column(db.String(1000), info='模型参数')
    update_time = db.Column(db.DateTime, server_default=db.FetchedValue(), info='更新时间')
    create_time = db.Column(db.DateTime, server_default=db.FetchedValue(), info='创建时间')
    is_deleted = db.Column(db.Integer, server_default=db.FetchedValue(), info='是否删除')
